function [ ECOCMatrix ] = BuildExhaustiveECOC( Classes )
%BUILDEXHAUSTIVEECOC Summary of this function goes here
%   Detailed explanation goes here

Functions = 2^(Classes-1)-1;
ECOCMatrix = ones(Classes, Functions);

for i = 2:1:Classes
    ZeroLength = 2^(Classes-i);
    Zeros = zeros(1, ZeroLength);
    ZeroCount = 2^(i-2);
    
    for j = 1:1:ZeroCount
        StartIndex = 2*ZeroLength*(j-1) + 1;
        EndIndex = StartIndex + ZeroLength - 1;
        
        ECOCMatrix(i, StartIndex:EndIndex) = Zeros;
    end
end

end

